import React from 'react';
import {WeaSearchGroup} from 'ecCom';
import {WeaLocaleProvider} from 'ecCom';
const getLabel = WeaLocaleProvider.getLabel;
import EType from './base/EType';
import ETitle from './base/ETitle';
import DataSourceTable from './base/DataSourceTable';

// 自定义页面
class Content_29 extends React.Component {
    render() {
        let __DataSourceTable = <div></div>;
        if (this.props.eShareLevel == '2') {
            __DataSourceTable = <DataSourceTable ecId={`${this && this.props && this.props.ecId || ''}_DataSourceTable@retx22`} ref="dataSourceTable" ebaseid="29" {...this.props.eTabs}/>;
        }

        return (
            <div>
                <WeaSearchGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@feeu7c`} title={getLabel(81711, '基本信息')} needTigger={true} showGroup={true}>
                    <EType ecId={`${this && this.props && this.props.ecId || ''}_EType@urylq1`} ref="eType" value={this.props.eBaseName}/>
                    {this.props.eShareLevel == '2' ? <ETitle ecId={`${this && this.props && this.props.ecId || ''}_ETitle@jucceh`} ref="eTitle" eid={this.props.eid} value={this.props.eTitle} {...this.props}/> : ''}
                </WeaSearchGroup>
                {__DataSourceTable}
            </div>
        );
    }

    getSaveValues() {
        return {
            eContentTitle: this.refs['eTitle'] ? this.refs['eTitle'].getSaveValues() : this.props.eTitle,
            eContentTabWidth: {tabwidth: this.props.etabwidth, methodvalue: this.props.methodvalue},
            eContentIsAlwaysShow: this.props.isAlwaysShow,
            eContenteTabStyle: {tabstyle: this.props.tabstyle, tabvalue: this.props.tabvalue, tabname: this.props.tabname},
            eTabs: this.refs['dataSourceTable'] ? this.refs['dataSourceTable'].getSaveValues() : {}
        };
    }
}

export default Content_29;
